package Cinema;

import org.w3c.dom.Element;
import Cinema.DataLayer.DataManager;
import Cinema.DataLayer.IDataManager;
import Cinema.DataLayer.IXmlParsable;
import Exceptions.WrongXMLElement;


/**
 * Represents a user of Cinema system.
 * @author The Fuchtzeinsoft Team.
 *
 */
public abstract class User implements IXmlParsable{

	protected String name;
	protected String email;
	protected String password;
	protected IDataManager dataManager;

	/**
	 * Constructor for 'User' object.
	 * @param userName
	 * @param email
	 */
	public User(String userName, String email) {
		this.name = userName;
		this.email = email;
	}

	/**
	 * Constructor for initializing 'User' from XML.
	 * @param element
	 * @throws WrongXMLElement
	 */
	public User(Element element) throws WrongXMLElement {
	}

	public void setDataMannager(DataManager dataMannager){
		this.dataManager = dataMannager;
	}

	/**
	 * @return the name of the User.
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the EMail of the User.
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @return the Password of the User.
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * Shows the user operations UI.
	 */
	public abstract void showUI();
}
